from django.db import models

# Create your models here.


class ATOP_CD_TASK(models.Model):
    """操作任务基本信息表"""
    task_id = models.CharField(max_length=32, unique=False, null=False)
    task_name = models.CharField(max_length=32, unique=False, null=False)
    task_desc = models.TextField(max_length=1024, unique=False, null=False)
    modules = models.CharField(max_length=32, unique=False, null=False)
    tag_str = models.CharField(max_length=256, unique=False, null=False)
    enabled = models.CharField(max_length=1, unique=False, null=False)
    action_type = models.CharField(max_length=16, unique=False, null=False)
    action_id = models.CharField(max_length=32, unique=False, null=False)
    action_version = models.IntegerField(unique=False, null=False)
    object_model = models.CharField(max_length=32, unique=False, null=False)
    object_filter = models.TextField(max_length=1024, unique=False, null=False)
    create_by = models.CharField(max_length=32, unique=False, null=False)
    create_time = models.DateTimeField(unique=False, null=False, auto_now_add=True)
    modify_by = models.CharField(max_length=32, unique=False, null=False)
    modify_time = models.DateTimeField(unique=False, null=False)

    class Meta:
        db_table = 'ATOP_CD_TASK'


class ATOP_CD_TASK_PARAM(models.Model):
    """操作参数对应表"""
    task_id = models.CharField(max_length=32, unique=False, null=False)
    task_version = models.IntegerField(unique=False, null=False)
    atom_id = models.CharField(max_length=32, unique=False, null=False)
    node_id = models.CharField(max_length=32, unique=False, null=False)
    param_id = models.CharField(max_length=32, unique=False, null=False)
    param_value = models.CharField(max_length=32, unique=False, null=False)

    class Meta:
        db_table = 'ATOP_CD_TASK_PARAM'
